Replication Package for: 'Civil Military Relations in the Aftermath of Coups: How Does Coup Failure Affect Counterbalancing in Autocratic Regimes?'

Artem Kyzym

This document describes the files needed to reproduce the results reported in: Civil Military Relations in the Aftermath of Coups: 
How Does Coup Failure Affect Counterbalancing in Autocratic Regimes?' (JCR). In particular, it includes all the datasets and code 
needed to reproduce the figures and tables in the article and in the online supplementary appendix

Folder Description
The replication package consists of three files:
1. An RMD file which includes all of the code necessary to replicate every table and figure called 'Replication_Code_Kyzym'
2. A CSV file which contains data with coding of coups by COLPUS called 'colpus_cw_final'
3. A CSV file which contains data with coding of coups by Powell and Thyne (2011) called 'pt_cw_final'
To run the code, either run by chunks, run All or knit the RMD file. 

Covariates in Dataset:
All relevant covariates in both the 'colpus_cw_final' and 'pt_cw_final' datasets are derived from the following authors:
1. SSF Dataset (De Bruin, 2021)
2. Wright (2021)
3. Gleditsch (2002)
4. Fails (2020)
5. NMC (Singer et al., 1972)
6. MID (Palmer et al., 2020)
7. ACD (Gleditsch et al., 2002)
8. EPR (Vogt et a., 2015)
9. Geddes et al. (2018)
10. ATOP (Leeds, 2022)
11. MPD (Sudduth, 2017)
12. Hadenius and Teorell (2007)
13. HIEF (Drazanova 2019)
All of these works are cited accordingly in either the main body or appendix

Software and Module Versions
• R version 4.3.2 (2023-10-31 ucrt)
• Platform: x86_64-w64-mingw32/x64 (64-bit)
• Running under: Windows 11 x64 (build 22631)

R Packages Used
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base  

other attached packages:
 [1] FNN_1.1.4.1        ranger_0.17.0      styler_1.10.3      htmltools_0.5.8.1  kableExtra_1.4.0   data.table_1.16.2  pandoc_0.2.0       modelsummary_2.2.0
 [9] ggpubr_0.6.0       panelr_0.7.8       lme4_1.1-36        Matrix_1.6-1.1     showtext_0.9-7     showtextdb_3.0     sysfonts_0.8.9     did2s_1.0.2       
[17] fixest_0.12.1      did_2.1.2          miceRanger_1.5.0   pdynmc_0.9.11      devtools_2.4.5     usethis_3.0.0      skimr_2.2.1        miceadds_3.17-44  
[25] mice_3.16.0        plm_2.6-4          countrycode_1.6.0  MASS_7.3-60        haven_2.5.4        foreign_0.8-85     lubridate_1.9.3    forcats_1.0.0     
[33] stringr_1.5.1      dplyr_1.1.4        purrr_1.0.2        readr_2.1.5        tidyr_1.3.1        tibble_3.2.1       ggplot2_3.5.1      tidyverse_2.0.0   
[41] pacman_0.5.1       

loaded via a namespace (and not attached):
  [1] splines_4.3.2       later_1.3.2         R.oo_1.27.1         cellranger_1.1.0    rpart_4.1.21        lifecycle_1.0.4     Rdpack_2.6.2        sf_1.0-21          
  [9] rstatix_0.7.2       globals_0.18.0      lattice_0.21-9      MatrixExtra_0.1.15  insight_1.0.0       backports_1.5.0     magrittr_2.0.3      rmarkdown_2.29     
 [17] yaml_2.3.10         remotes_2.5.0       httpuv_1.6.15       collapse_2.0.17     sessioninfo_1.2.2   pkgbuild_1.4.5      gld_2.6.6           cowplot_1.1.3      
 [25] DBI_1.2.3           minqa_1.2.8         abind_1.4-8         pkgload_1.4.0       R.cache_0.17.0      expm_1.0-0          R.utils_2.13.0      nnet_7.3-19        
 [33] pracma_2.4.4        rappdirs_0.3.3      sandwich_3.1-1      float_0.3-2         jtools_2.3.0        dreamerr_1.4.0      listenv_0.9.1       optimx_2023-10.21  
 [41] units_0.8-7         bigmemory_4.6.4     parallelly_1.45.1   svglite_2.1.3       codetools_0.2-19    xml2_1.3.6          tidyselect_1.2.1    shape_1.4.6.1      
 [49] farver_2.1.2        broom.mixed_0.2.9.6 base64enc_0.1-3     jsonlite_1.8.9      e1071_1.7-16        mitml_0.4-5         ellipsis_0.3.2      Formula_1.2-5      
 [57] survival_3.5-7      iterators_1.0.14    systemfonts_1.1.0   foreach_1.5.2       tools_4.3.2         ragg_1.5.0          miscTools_0.6-28    DescTools_0.99.58  
 [65] Rcpp_1.0.13-1       glue_1.8.0          pan_1.9             mgcv_1.9-0          xfun_0.53           withr_3.0.2         numDeriv_2016.8-1.1 fastmap_1.2.0      
 [73] mitools_2.4         boot_1.3-28.1       fansi_1.0.6         SparseM_1.84-2      didimputation_0.3.0 digest_0.6.37       timechange_0.3.0    R6_2.6.1           
 [81] mime_0.12           textshaping_1.0.3   colorspace_2.1-1    R.methodsS3_1.8.2   RhpcBLASctl_0.23-42 utf8_1.2.4          generics_0.1.3      class_7.3-22       
 [89] httr_1.4.7          htmlwidgets_1.6.4   pkgconfig_2.0.3     gtable_0.3.6        Exact_3.3           fastglm_0.0.3       lmtest_0.9-40       furrr_0.3.1        
 [97] carData_3.0-5       profvis_0.4.0       scales_1.3.0        BMisc_1.4.6         lmom_3.2            cobalt_4.5.5        reformulas_0.4.0    corrplot_0.95      
[105] bigmemory.sri_0.1.8 knitr_1.50          rstudioapi_0.17.1   uuid_1.2-1          tzdb_0.5.0          nlme_3.1-163        nloptr_2.1.1        bdsmatrix_1.3-7    
[113] repr_1.1.7          proxy_0.4-27        cachem_1.1.0        zoo_1.8-12          rootSolve_1.8.2.4   KernSmooth_2.23-22  parallel_4.3.2      miniUI_0.1.1.1     
[121] pillar_1.9.0        grid_4.3.2          stringmagic_1.1.2   vctrs_0.6.5         urlchecker_1.0.1    promises_1.3.0      DRDID_1.2.0         car_3.1-3          
[129] jomo_2.7-6          maxLik_1.5-2.1      xtable_1.8-4        evaluate_1.0.5      mvtnorm_1.3-2       cli_3.6.3           compiler_4.3.2      rlang_1.1.4        
[137] crayon_1.5.3        ggsignif_0.6.4      labeling_0.4.3      classInt_0.4-11     fs_1.6.5            pander_0.6.5        stringi_1.8.4       viridisLite_0.4.2  
[145] tables_0.9.31       munsell_0.5.1       glmnet_4.1-8        hms_1.1.3           future_1.67.0       shiny_1.9.1         trust_0.1-8         rbibutils_2.3      
[153] broom_1.0.7         memoise_2.0.1       readxl_1.4.3   